//路由配置
WeChatApp.config(function($stateProvider, $urlRouterProvider) {
    $urlRouterProvider.otherwise('/index');
    $stateProvider
        .state('index', {
            url: '/index',
            views: {
                '': {
                    templateUrl: 'static/views/index.html'
                },
                'leftbar@index': {
                    templateUrl: 'static/views/leftbar.html'
                },
                'main@index': {
                    templateUrl: 'static/views/home.html'
                }
            }
        })
        .state('index.application', {
            url: '/application',
            views: {
                'main@index': {
                    templateUrl: 'static/views/application.html',
                }
            }
        })
        /*.state('index.usermng.highendusers', {
            url: '/highendusers',
            templateUrl: 'tpls3/highendusers.html'
        })
        .state('index.usermng.normalusers', {
            url: '/normalusers',
            templateUrl: 'tpls3/normalusers.html'
        })
        .state('index.usermng.lowusers', {
            url: '/lowusers',
            templateUrl: 'tpls3/lowusers.html'
        })
        .state('index.usermng.addusertype', {
            url: '/addusertype',
            templateUrl: 'tpls3/addusertypeform.html',
            controller: function($scope, $state) {
                $scope.backToPrevious = function() {
                    window.history.back();
                }
            }
        })*/
        .state('index.statistics', {
            url: '/statistics',
            views: {
                'main@index': {
                    templateUrl: 'static/views/statistics.html',
                }
            }
        })
        .state('index.system', {
            url: '/system',
            views: {
                'main@index': {
                    templateUrl: 'static/views/system.html',
                }
            }
        })
});
